• Dummy Article For Plugin Page

polyhedra    v1.2

  • Overview
  • Quick Start
  • Documentation
  • Release Notes

Polyhedra

Plugin to draw the five Platonic solids, size specified by either radius or side of solid.

v1.3 updated parametric.rb to preserve the order of parameters (thanks to Steve Baumgartner) and v1.4 prevents duplication of context menu entries if another plugin also uses parametric.rb.

Install the plugin in the usual way (see notes at Sketchup Knowledge Centre - Installing Ruby Plugins).

After installation, you should find a new Draw menu item Polyhedra, with a sub-menu for each shape.

At the first prompt, choose whether to specify the size by length of one side, or by the radius (of a circumscribed sphere).

At the second prompt, enter any valid length, in any valid units, for either Side or Radius as previously chosen, press OK, and the solid will be drawn as a component, and you can pick the insertion point for its centre. You will get an error message if your length entry cannot be parsed as a length by Sketchup.

To edit the solid, right click on it and choose Edit . This will prompt for a new value for the size.

To change to sizing it by radius rather than side, or vice versa, delete the solid and draw it again.

Centre point for each solid added in v1.12 - use menu View>Face Style>Xray or Wireframe to see and pick centre point for Move or Copy operations.

Centre point on bottom face (where relevant) added in v1.2

Polyhedra

Plugin to draw the five Platonic solids, size specified by either radius or side of solid.

Install the plugin in the usual way (see notes at Sketchup Knowledge Centre - Installing Ruby Plugins).

After installation, you should find a new Draw menu item Polyhedra, with a sub-menu for each shape.

At the first prompt, choose whether to specify the size by length of one side, or by the radius (of a circumscribed sphere).

At the second prompt, enter any valid length, in any valid units, for either Side or Radius as previously chosen, press OK, and the solid will be drawn as a component, and you can pick the insertion point for its centre. You will get an error message if your length entry cannot be parsed as a length by Sketchup.

To edit the solid, right click on it and choose Edit . This will prompt for a new value for the size.

To change to sizing it by radius rather than side, or vice versa, delete the solid and draw it again.

Centre point for each solid added in v1.12 - use menu View>Face Style>Xray or Wireframe to see and pick centre point for Move or Copy operations.

SketchUp plugin to draw regular polyhedra

© John McClenahan 3 April 2014 Revised 23 Nov 2014 - v1.2 now draws placeable components, not a group at the origin

Introduction

This plugin draws the five Platonic solids: - Tetrahedron - Octahedron - Cube - Dodecahedron - Icosahedron.

The size can be specified in any units supported by Sketchup (Architectural Feet and Inches; Decimal feet, inches, millimetres, centimetres or metres, Engineering Feet, or Fractional inches), and can set either the radius of the solid, or the length or its edge.

It works in SketchUp v8 M2 or later, including SU2013, SU2014 and SU2015 (64 bit) a dn later up to v2019 on Windows and Mac OS X from El Capitan to Mojave.

Usage

After installation (see README.md) you should find an extra item in the Draw menu, Polyhedra with a submenu for each shape as listed above.

After clicking on the selected shape, you will be prompted whether to specify the size by the length of one side of the shape, or by its radius (the radius of a circumscribed sphere).

At the second prompt, enter any valid length, in any valid units, for either Side or Radius as previously chosen, press OK, and the solid will be drawn as a component, and you can pick the insertion point for its centre. You will get an error message if your length entry cannot be parsed as a length by Sketchup.

Centre point for each solid added in v1.12 - use menu View>Face Style>Xray or Wireframe to see and pick centre point for Move or Copy operations.

Calculations

I tried first to calculate the location of polhedron vertices algebraically, and was able to do so easily for several of them (see code and comments in polyhedra.rb).

But some of the formulae given in Wikipedia (e.g., for the location of the vertices of a Tetrahedon centred on the origin) are just wrong, and others were not helpful in locating the centres of other polyhedra.

So I resorted to construction in Sketchup, at a very large scale (unit radius of one million inches, with model info set to display five figures after the decimal point), used the Tape Measure tool to scale the model to an exact size of either radius or edge, and used the Dimension tool to measure key dimensions.

Tetrahedron

Tetrahedron construction

Dodecahedron

Dodecahedron construction

Icosahedron

Icosahedron construction

Details of how to construct Dodecahedron and Icosahedron in SketchUp, using rectangles with sides in the Golden Ratio (1 : (1+ sqrt(5))/2), were very helpful: see for example:

https://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0CDkQtwIwAQ&url=http://www.youtube.com/watch?v=QL6O-icBxdE&ei=oGs8U4moH8W1hAfW0oHYCQ&usg=AFQjCNHdqdr0VrrMgTmgnKrRsJeq2U4iUA&sig2=wV6q7qbf22aCXmdSs5GgKA&bvm=bv.63934634,d.ZG4

https://www.youtube.com/watch?v=3TWRvqVgCEI

Release notes for Polyhedra plugin

v1.0 Draws all Platonic solids. Parts of the code adapted from Parametric 3D Shapes plugin

v1.11 Added choice of length of side, or radius, for size.

v1.12 Added cpoint at centre of each solid, to act as pick point for subsequent Move or Copy operation

v1.2 Changed to create a component definition rather than a group, and to draw a component at the user's choice of pick point. Added cpoint at centre of bottom face (where relevant) to act as an alternative pick point for subsequent Move or Copy operations

v1.3 Steve Baumgartner amended parametric.rb and the calling polyhedra.rb programs to preserve parameter ordering on editing.

v1.4 Further edit of parametric.rb to prevent duplicate context menu entries if more than one plugin uses parametric.rb.